<template>
	<view>
		<u-navbar :is-back="true" title="系统设置"></u-navbar>
		<view class="content">
			<view class="collapse-item">
				<view class="collapse-item-top" @click="gouppwd()">
					<text class="item-title">修改密码</text>
					
				</view>
				<view class="collapse-item-body" v-show="isOpen">
					<view class="collapse-body-top">好友列表</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
				</view>
			</view>
			<view class="collapse-item">
				<view class="collapse-item-top">
					<text class="item-title">消息设置</text>
					<image src="../../static/img/acitivity/xuanze.png" class="xuanze"></image>
				</view>
				<view class="collapse-item-body" v-show="isOpen">
					<view class="collapse-body-top">好友列表</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
				</view>
			</view>
		    <view class="collapse-item">
		    	<view class="collapse-item-top">
		    		<text class="item-title">隐私设置</text>
		    		<image src="../../static/img/acitivity/xuanze.png" class="xuanze"></image>
		    	</view>
		    	<view class="collapse-item-body" v-show="isOpen">
		    		<view class="collapse-body-top">好友列表</view>
		    		<view class="collapse-body-list u-flex">
		    			<image src="../../static/demo/1.jpg" class="toux"></image>
		    			<text class="name color5 u-font-24">好友1</text>
		    		</view>
		    		<view class="collapse-body-list u-flex">
		    			<image src="../../static/demo/1.jpg" class="toux"></image>
		    			<text class="name color5 u-font-24">好友1</text>
		    		</view>
		    		<view class="collapse-body-list u-flex">
		    			<image src="../../static/demo/1.jpg" class="toux"></image>
		    			<text class="name color5 u-font-24">好友1</text>
		    		</view>
		    	</view>
		    </view>
		</view>
		<view class="content">
			<view class="collapse-item">
				<view class="collapse-item-top">
					<text class="item-title">关于说明</text>
					<image src="../../static/img/acitivity/xuanze.png" class="xuanze"></image>
				</view>
				<view class="collapse-item-body" v-show="isOpen">
					<view class="collapse-body-top">好友列表</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
				</view>
			</view>
			<view class="collapse-item">
				<view class="collapse-item-top">
					<text class="item-title">切换账号</text>
					<image src="../../static/img/acitivity/xuanze.png" class="xuanze"></image>
				</view>
				<view class="collapse-item-body" v-show="isOpen">
					<view class="collapse-body-top">好友列表</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
					<view class="collapse-body-list u-flex">
						<image src="../../static/demo/1.jpg" class="toux"></image>
						<text class="name color5 u-font-24">好友1</text>
					</view>
				</view>
			</view>
		    <view class="collapse-item">
		    	<view class="collapse-item-top" @click="logout()">
		    		<text class="item-title">退出登录</text>
		    		<!-- <image src="../../static/img/acitivity/xuanze.png" class="xuanze"></image> -->
		    	</view>
		    	<view class="collapse-item-body" v-show="isOpen">
		    		<view class="collapse-body-top">好友列表</view>
		    		<view class="collapse-body-list u-flex">
		    			<image src="../../static/demo/1.jpg" class="toux"></image>
		    			<text class="name color5 u-font-24">好友1</text>
		    		</view>
		    		<view class="collapse-body-list u-flex">
		    			<image src="../../static/demo/1.jpg" class="toux"></image>
		    			<text class="name color5 u-font-24">好友1</text>
		    		</view>
		    		<view class="collapse-body-list u-flex">
		    			<image src="../../static/demo/1.jpg" class="toux"></image>
		    			<text class="name color5 u-font-24">好友1</text>
		    		</view>
		    	</view>
		    </view>
		</view>
		<tarBer :totarBer='tar'></tarBer>
	</view>
</template>

<script>
	import { mapMutations,mapState } from 'vuex';
	import tarBer from '../../components/tabBarFoot/tabBarFoot.vue';

	export default {
		components:{
				 tarBer
			 },
		data() {
			return {
				isOpen:false,
				tar:{
						color:'#fff',
						id:1		 
				},
			};
		},
		computed: {
			...mapState('user',['token','userinfo']),
		},
		methods:{
			...mapMutations('user',['setToken','setUserInfo']),
			gouppwd(){
				return uni.navigateTo({
					url:'/pages/user/xiugaimima'
				})
			},
			logout(){
				uni.showModal({
					content: '确定要退出么',
					success: (e)=>{
						if(e.confirm){
							this.setToken('')
							setTimeout(()=>{
								uni.switchTab({
									url: '/pages/user/user'
								});
							}, 1000)
						}
					}
				});	
			},
		}
	}
</script>

<style lang="scss">
page{
	background-color: #e6e6e6;
}
.content{
	margin-top: 20rpx;
}
.collapse-item{
	position: relative;
	margin-bottom: 4rpx;
}
.collapse-item-top{
	background-color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 30rpx 50rpx;
	.item-title{
		font-size: 28rpx;
		color: #515151;
	}
	.xuanze{
		width: 48rpx;
		height: 48rpx;
	}
}
.collapse-body-top{
	padding: 30rpx 50rpx;
	font-size: 28rpx;
	color: #515151;
	background-color: #ebebeb;
}
.collapse-body-list{
	padding: 25rpx 50rpx;
	background-color: #FFFFFF;
	margin-bottom: 6rpx;
	.toux{
		width: 70rpx;
		height: 70rpx;
		margin-right: 30rpx;
		border-radius: 10rpx;
	}
	.name{
		
	}
}
</style>
